<include file="Public/head"/>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                <div class="col-sm-12">
                    <div class="tabbable">
                        <ul class="nav nav-tabs" id="myTab4">
                            <li class="active">
                                <a data-toggle="tab" href="#home4">个人资料</a>
                            </li>
                            <li class="">
                                <a data-toggle="tab" href="#profile4">收款信息</a>
                            </li>
                        </ul>
                        <form class="form-horizontal" action="{:U('update')}" method="post">
                        <div class="tab-content">
                            <div id="home4" class="tab-pane active">
                                <div class="row">
                                    <div class="col-xs-12">
                                        <!-- PAGE CONTENT BEGINS -->
                                            <div class="form-group">
                                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 帐号 </label>
                                                <div class="col-sm-9">
                                                    <input type="text" name="user"
                                                           <if condition="$member['uid'] neq 0">readonly
                                                        <else/>
                                                        
                                                    </if>
                                                    class="rcol-xs-10 col-sm-5" value="{$member.user}">
                                                    <input type="hidden" name="uid" value="{$member['uid']}">
                                                    <span class="help-inline col-xs-12 col-sm-7">
                                                        <if condition="$member['uid'] eq 1"><span class="middle">无法修改</span></if>
                                                    </span>
                                                </div>
                                            </div>

                                            <div class="space-4"></div>

                                            <div class="form-group">
                                                <label class="col-sm-1 control-label no-padding-right" for="form-field-10"> 权限组 </label>
                                                <div class="col-sm-9">
                                                    <if condition="$login_gid neq 1">
                                                        <input type="text" class="col-xs-10 col-sm-5" value="{$usergroup[0]['title']}"
                                                                       readonly>
                                                        <input type="hidden" name="group_id" id="group_id"
                                                                       class="col-xs-10 col-sm-5" value="{$usergroup[0]['id']}">

                                                    <else/>
                                                        <select id="group_id" name="group_id" class="rcol-xs-10 col-sm-5" >
                                                            <volist name="usergroup" id="val">
                                                                <option value="{$val['id']}"
                                                            <if condition="$val['id'] eq $member['group_id']">selected="selected"
                                                            </if>
                                                            >{$val['title']}</option>
                                                        </volist>
														</select>
														<span class="help-inline col-xs-12 col-sm-7">
															<span class="middle">请慎重选择权限组</span>
														</span>
													</if>
                                            </div>
                                        </div>

                                        <div class="space-4"></div>

                                        <div class="form-group">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 密码 </label>
                                            <div class="col-sm-9">
                                                <input type="password" name="password" id="password" placeholder="密码"
                                                       class="col-xs-10 col-sm-5" value="">
                                                <span class="help-inline col-xs-12 col-sm-7">
                                                    <span class="middle">留空不修改</span>
                                                </span>
                                            </div>
                                        </div>

                                        <div class="space-4"></div>

                                        <div class="form-group">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> 联系电话 </label>
                                            <div class="col-sm-9">
                                                <input type="text" name="phone" id="qq" placeholder="联系电话" class="col-xs-10 col-sm-5"
                                                       value="{$member['phone']}">
                                                <span class="help-inline col-xs-12 col-sm-7">
                                                    <span class="middle"></span>
                                                </span>
                                            </div>
                                        </div>
                                        
                                        <div class="space-4"></div>

                                        <div class="form-group">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> Q&nbsp;&nbsp;Q </label>
                                            <div class="col-sm-9">
                                                <input type="text" name="qq" id="qq" placeholder="QQ" class="col-xs-10 col-sm-5"
                                                       value="{$member['qq']}">
                                                <span class="help-inline col-xs-12 col-sm-7">
                                                    <span class="middle"></span>
                                                </span>
                                            </div>
                                        </div>
                                        
                                        <div class="space-4"></div>
                                        
                                        <div class="form-group">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> 分成比例 </label>
                                            <div class="col-sm-9">
                                                <input type="text" name="proportion" id="proportion" placeholder="分成比例" class="col-xs-10 col-sm-5"
                                                       value="{$member['proportion']}">
                                                <span class="help-inline col-xs-12 col-sm-7">
                                                    <span class="middle">%</span>
                                                </span>
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> 等级 </label>
											<div class="col-sm-9">
												<select id="hierarchy" name="hierarchy" class="rcol-xs-10 col-sm-5">
														<option value="1"
														<if condition="1 eq $member['hierarchy']">selected="selected"
														</if>
														>待定</option>
														<option value="2"
														<if condition="2 eq $member['hierarchy']">selected="selected"
														</if>
														>差</option>
														<option value="3"
														<if condition="3 eq $member['hierarchy']">selected="selected"
														</if>
														>良</option>
														<option value="4"
														<if condition="4 eq $member['hierarchy']">selected="selected"
														</if>
														>优</option>
												</select>
											</div>
                                        </div>
										<if condition="$user['level'] eq 1">
										<!-- 超管可操作 
										<div class="form-group" style="height: 38px;overflow: hidden;">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> 账户可提现 </label>
											<div class="col-sm-9">
												<span style="float:left;display: block;line-height: 56px;" class="col-sm-5">
													<label>
														<input name="if_user_cash" id="if_user_cash"
														<if condition="$member.if_user_cash eq 1">checked="checked"</if>
														value="1" class="ace ace-switch ace-switch-2" type="checkbox" />
														<span class="lbl"></span>
													</label>
												</span>
												<span class="help-inline col-xs-12 col-sm-7">
													<span class="middle">下级帐户是否可提现</span>
												</span>
											</div>
                                        </div>--->
										</if>
										<if condition="$user['level'] eq 1 || ($UserJurisdiction['if_user_lock'] eq 1 && $user['level'] neq 4)">
										<!-- 超管可操作 --->
										<div class="form-group" style="height: 38px;overflow: hidden;">
                                            <label class="col-sm-1 control-label no-padding-right" for="form-field-7"> 账户可锁定 </label>
											<div class="col-sm-9">
												<span style="float:left;display: block;line-height: 56px;" class="col-sm-5">
													<label>
														<input name="if_user_lock" id="if_user_lock"
														<if condition="$member.if_user_lock eq 1">checked="checked"</if>
														value="1" class="ace ace-switch ace-switch-2" type="checkbox" />
														<span class="lbl"></span>
													</label>
												</span>
												<span class="help-inline col-xs-12 col-sm-7">
													<span class="middle">是否可禁止下级帐户登录</span>
												</span>
											</div>
                                        </div>
										</if>
                                  <!-- PAGE CONTENT ENDS -->
                                </div><!-- /.col -->
                            </div><!-- /.row -->
                            </div>

                            <div id="profile4" class="tab-pane">
                                <div class="row">
                                    <div class="space-4"></div>
                                    <div class="form-group">
                                        <label class="col-sm-1 control-label no-padding-right" for="form-field-6"> 收款方式 </label>
                                        <div class="col-sm-9">
											<select class="rcol-xs-10 col-sm-5" name="account_type">
												<option value="1" <if condition="$member['account_type'] eq 1">selected</if> >支付宝</option>
												<!--<option value="2" <if condition="$member['account_type'] eq 2">selected</if> >微信</option>-->
												<option value="3" <if condition="$member['account_type'] eq 3">selected</if> >银行卡</option>
											</select>
                                        </div>
                                    </div>
                                    
                                    <div class="space-4"></div>
                                    <div class="form-group">
                                        <label class="col-sm-1 control-label no-padding-right" for="form-field-6"> 真实姓名 </label>
                                        <div class="col-sm-9">
                                            <input type="text" name="truename" id="truename" placeholder="真实姓名"
                                                   class="col-xs-10 col-sm-5" value="{$member['truename']}">
                                            <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle"></span>
                                            </span>
                                        </div>
                                    </div>
                                    
                                    <div class="space-4"></div>
                                    <div class="form-group">
                                        <label class="col-sm-1 control-label no-padding-right" for="form-field-6"> 帐号 </label>
                                        <div class="col-sm-9">
                                            <input type="text" name="alipay" id="alipay" placeholder="帐号"
                                                   class="col-xs-10 col-sm-5" value="{$member['alipay']}">
                                            <span class="help-inline col-xs-12 col-sm-7">
                                                <span class="middle"></span>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="form-group">
                                <div class="space-4"></div>

                                    <div class="col-md-offset-2 col-md-9">
                                        <button class="btn btn-info" type="submit">
                                            <i class="icon-ok bigger-110"></i>
                                            提交
                                        </button>

                                        &nbsp; &nbsp; &nbsp;
                                        <button class="btn" type="reset">
                                            <i class="icon-undo bigger-110"></i>
                                            重置
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form> 
                    </div>
                </div>
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/qwadmin/js/function.js"></script>
<script type="text/javascript">
        jQuery(function ($) {
            $('#birthday').datepicker({
                format: 'yyyy-mm-dd',
                weekStart: 1,
                autoclose: true,
                todayBtn: 'linked',
                language: 'cn'
            });
			$('#group_id').change(function(){
				setProportion();
			});
			setProportion();
        });
		/**
		* 分成比例设置
		**/
		function setProportion(){
			var proportion = $.trim($('#proportion').val());
			var group_id = $('#group_id').val();
			if(group_id=='1'){
				proportion = 100;
			}else if(group_id=='2'){
				proportion = 90;
			}else if(group_id=='3'){
				proportion = 80;
			}else if(group_id=='4'){
				proportion = 70;
			}
			$('#proportion').val(proportion);
		}
</script>
</body>
</html>
